import request from '@/utils/request'

/**
 * 新增
 */
export const sava=(param)=>{
  return request({
        url: '/QH/BatInfo/addBatInfo?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 修改
 */
export const edit=(param)=>{
  return request({
        url: '/QH/BatInfo/editBatInfo?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 分页
 */
export const list=(param)=>{
  return request({
        url: '/QH/BatInfo/selectBatInfoList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        params: param
      });
}
/**
 * 电池类型
 */
export const btypelist=(param)=>{
  return request({
        url: '/QH/BatInfo/selectBatTypeList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}

/**
 * 删除
 */
export const del=(param)=>{
  return request({
        url: '/QH/BatInfo/delBatInfo?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}


/**
 * 查询单个电池包实时数据
 */
export const getReal=(param)=>{
  return request({
        url: '/QH/DataServer/getRealTimeData?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}